import json

from api.base_service import BaseService


class UserService(BaseService):
    def __init__(self):
        super().__init__()
        self.service_name = "UserService"
    def find_by_user_name(self, name):
        resp = self.dubbo_client.invoke(self.service_name,"findByUsername",name)
        return json.loads(resp)
if __name__ == '__main__':
    us = UserService()
    result = us.find_by_user_name("admin")
    print(result)